
;;====================================================
;; Routine to create the SINGS comparison plot with the latest version
;;   of the 8-micron fits.

restore,'ancillary/sings_spirals.sav',/ver

myps,'./irdc_dist_model/analysis_plots/irac4_compare.eps'

;multiplot,[2,1],xgap=0.01

;; Vertically-integrated thingies...
MAKE_RADIAL_PROFILE_8UM


;; al_legend,/top,/right,linestyle=0,box=0,color=cnames,textcolor=textcolor,$
;;           ['Case '+string(indgen(4)+1,format="(I0)")],thick=thick


;; SINGS plot
plot,[0,1],[0,1],/nodata,yr=[0.1,1000],/ylog,/yst,xr=[0,15],/xst,$
     xtit='R!dgal!n [kpc]',xticks=3,xminor=5,xthick=3,ythick=3,$
     ytickformat='exponent10',$
     ytit='Surface Brightness Normalized at R!dgal!n = 8.5 kpc'

FOR i=0L, n_elements(sings)-1 DO BEGIN
   CASE fix(round(sings[i].t)) OF
      2: color = 'Red'
      3: color = 'Orange'
      4: color = 'Gray'
      5: color = 'Opposite'
      6: color = 'Blue'
      7: color = 'Cyan'
   ENDCASE
   print,color
   
   oplot,sings[i].rad,sings[i].norm,color=cgColor(color),thick=3
   
ENDFOR

restore,'./irdc_dist_model/vert_int_radial_profile_8um.sav',/ver

;;Normalize profiles to 8.5 kpc
ind = where( Rgal EQ 8.5)
FOR i=4, 6 DO BEGIN
   ist = string(i,format="(I0)")
   command = 'rad_profile_case'+ist+' /= (rad_profile_case'+ist+'[ind])[0]'
   err = Execute(command)
ENDFOR

cnames = ['YGB7','Lime Green','TG3','RED7']
colors = cgColor(cnames)
textcolor = cgColor('RYB8')
thick=[6,5,4,3]

;; plot,[0,1],[0,1],/nodata,yr=[0.1,1000],/ylog,/yst,xr=[0,15],/xst,$
;;      xtit='R!dgal!n [kpc]',xticks=3,xminor=5,ytickformat='exponent10',$
;;      ytit='Surface Brightness Normalized at R!dgal!n = 8.5 kpc',$
;;      xthick=3,ythick=3

pind = WHERE(Rgal GE 3.5 AND Rgal LE 8, np)


oplot,Rgal[pind],rad_profile_case6[pind],color=cgColor("Lime Green"),thick=15




al_legend,/top,/right,['T = '+string(indgen(6)+2,format="(I0)"),$
                      'Milky Way'],linestyle=0,$
          color=['Red','Orange','Gray','Opposite','Blue','Cyan','Lime Green'],$
          box=0,textcolor=textcolor,thick=[replicate(3,6),15],linsize=0.6,$
          delimiter='    '


myps,/done

END
